
#include <cstdlib>
#include <exception>
#include <iostream>

#include "Scene/Manager.hpp"

#include "File/MapLoader.hpp"
#include "Scene/Game/Map.hpp"

int     main()
{
	bool	ret = false;

	try
	{
		Scene::Manager		game;
        File::MapLoader     mapLoader;
        Scene::Game::Map    map(10, 10);

        mapLoader.loadFile("doc/mapFile.xml");
		ret = game.run();
	}
	catch (std::exception const &e)
	{
		std::cout << "An unhandled error occured." << std::endl << "Error: " << e.what() << std::endl;
	}
	catch (...)
	{
		std::cout << "An unhandled error occured." << std::endl;
	}

    return (ret ? EXIT_SUCCESS : EXIT_FAILURE);
}
